Skip to content

Update gitbase dependencies and turnoff proto logs. #422

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Aug 14, 2018
Merged

Update gitbase dependencies and turnoff proto logs. #422

merged 4 commits into from
Aug 14, 2018

Conversation

kuba--
Copy link
Contributor

@kuba-- kuba-- commented Aug 13, 2018

Signed-off-by: kuba-- [email protected]

This commit updates dependencies and registers a new index driver (pilosalib).
Because packages go-pilosa and pilosa share and register the same types in protobufs we have to double check if type was already registered. This is temporary fix to avoid logging duplicate proto type registered when gitbase starts.

@kuba-- kuba-- added the proposal proposal for new additions or changes label Aug 13, 2018
@kuba-- kuba-- requested a review from ajnavarro August 13, 2018 10:25
@ajnavarro
Copy link
Contributor

@kuba-- please, rebase with master, you have a commit from @erizocosmico

@kuba--
Copy link
Contributor Author

kuba-- commented Aug 13, 2018

@ajnavarro - rebased.

@kuba--
Copy link
Contributor Author

kuba-- commented Aug 13, 2018

After merge into the master it closes: #413

@@ -193,6 +194,7 @@ func (c *Server) registerDrivers() error {
logrus.Debug("established connection with pilosa")

c.engine.Catalog.RegisterIndexDriver(pilosa.NewDriver(c.IndexDir, client))
c.engine.Catalog.RegisterIndexDriver(pilosalib.NewDriver(c.IndexDir))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should we use another folder for that driver? maybe we can create a mess if we name two indexes in the same way from different drivers.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can do that, but in theory it should work, because it's a root folder where mapping and config file goes. Mapping and Config are the same. The only concern I have if someone wants to create a 2 indexes for the same expression (but I think it's not possible).
So for old pilosa mapping and config goes to root/db/table/id with names config.yml, mapping.db. Config contains information about what driver was used to create an index.
An extra metadata for pilosalib goes under to .pilosalib folder under id folder.

So it's up to us. if we want to have 2 different roots per driver.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would prefer two folders to avoid unexpected problems.

Copy link
Contributor Author

@kuba-- kuba-- Aug 13, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok, fair enough - I've sent an update

@kuba--
Copy link
Contributor Author

kuba-- commented Aug 13, 2018

FYI: I modified server.go. Right now, if we cannot connect to pilosa server, we just log a warning (instead of returning an error) and skip registration (for this particular driver).
pilosalib driver will be registered by default (without any conditions).

@ajnavarro ajnavarro merged commit b480f79 into src-d:master Aug 14, 2018
@kuba-- kuba-- deleted the turnoff-protologs branch August 14, 2018 06:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
proposal proposal for new additions or changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants